package cn.buddha.jec;

import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName Encrypt
 * @Author 友野浩二
 * @Date 2019/11/12 21:59
 * @Description 数据加密
 * @Version 1.0
 */
public class Encrypt {

    static String url = "http://127.0.0.1:9035/encrypt";

    /*
     * @Author 友野浩二
     * @Description // 通过RestTemplate进行数据加密
     * @Date 2019/11/12 22:02
     * @Param [args]
     **/
    public static void main(String[] args) {
        // 账号: AQBVYtDLEmxVjfRs8NGI47YhmP4NmIoxda5oKFWxrkTyqWZCl6mQuLVczFr2Yy9Ed8hSBDisCKNbjDjHYoAunBmc7I72wcTLJWMRBQQWPfoGzSamuJKdzGz16X7P447z2OebE80ZAo9/MsjW0clnSC5b5GIqsfiTkOQzS1Gdb1jqFxXiAp4pv4JA35fVPV4WjYkK69hIl6rmpXu5dwHZ8S+sURXBxi+8b1b3Hay8u5hVTBgpcJ8zJ8l9mTlTbOkHL1I7M65U7bbiHNwLeykC5XdHdpfPhgCVEls0+Kdb5xlGm+7//8cYQdJRXx769kROuNQqKHnYXZE/ov4d8CmEag+XVjjUgfbksG/B/r2lnuRF6UdBxymD/jJkrDukwlyI9EEXUYX/n33Shs+usWYwi36l
        // 密码: AQAc69jjcUeSRr/HGQ03H/i4tEmgz9j7UgDuzJ00RzTpA5ZkEY98/E6XTrnUS3hA9Fsi8e0Nq9ROeY4SwE4yKTgqP0RnCnYzKvrHfybrxUYHAmjJdafxoL0u1GdGyqiOlCJCDhgEbu4R1TYIrjtUvJc3EStiWnqir6xTiEuAufnJQa+c88oF64iti0Qtu/hsJSNDrEV9C3cezONBNoixIYK9RoF/M1jtuiXTwf4ox5pYHbT30ZjTrDXwAzMxZbAGA9+N4elyiarp3DifDPKJnwfaSRLROa+M9lj3hqsVjzDr6nYJIoEzO4xF1YHc8wqiK0YKCr1emY3x+e+jVIOpDnDxUy886j6V9qDgnJW+xlD4hjk/VD5CAa7eIUdE1gHVt7c=
        RestTemplate restTemplate = new RestTemplate();
        ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, "I'm ac sit20191112!", String.class);
        System.err.println("加密结果: " + responseEntity.getBody());
    }

}
